{% extends 'public/base.html' %}
{% block 'con' %}
<!-- 内容区域 -->
    <div class="tpl-content-wrapper">

        <div class="container-fluid am-cf">
            <div class="row">
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
                    <div class="page-header-heading">
                        <span class="am-icon-user page-header-heading-icon"></span> 订单管理
                    </div>
                </div>
            </div>
        </div>
        
        <div class="row-content am-cf">
            <div class="row">
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    <div class="widget am-cf">
                        
                        <div class="widget-body  am-fr">

                            <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                                <div class="am-form-group">
                                    <div class="am-btn-toolbar">
                                        <div class="am-btn-group am-btn-group-xs">
                                            <button type="button" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</button>
                                            <button type="button" class="am-btn am-btn-default am-btn-secondary"><span class="am-icon-save"></span> 保存</button>
                                            <button type="button" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-archive"></span> 审核</button>
                                            <button type="button" class="am-btn am-btn-default am-btn-danger"><span class="am-icon-trash-o"></span> 删除</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
            
                        <form action="" method="">
                           

                            <div class="am-u-sm-12 am-u-md-12 am-u-lg-offset-2 am-u-lg-3">
                                <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                    <input name="keywords" type="text" class="am-form-field" value="{{ request.GET.keywords }}">
                                    <span class="am-input-group-btn">
                                    <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search"></button>
                                </span>
                            </div>
                            </div>
                        </form>
                            <div class="am-u-sm-12">
                                <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black " >
                                    <thead>
                                        <tr>
                                            <th>用户</th>
                                            <th>收货人</th>
                                            <th>商品标题</th>
                                            <th>数量</th>
                                            <th>地址</th>
                                            <th>电话</th>
                                            <th>状态</th>
                                            <th>添加时间</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for v in info %}

                                        <tr class="">
                                            <td class="am-text-middle">{{ v.orderid.uid.username }}</td>
                                            <td class="am-text-middle">{{ v.orderid.addname }}</td>
                                            <td class="am-text-middle">{{ v.gid.title }} </td>
                                            <td class="am-text-middle">{{ v.num }} </td>
                                            <td class="am-text-middle">{{ v.orderid.address }} </td>
                                            <td class="am-text-middle">{{ v.orderid.addphone }} </td>

                                            <td class="am-text-middle">
                                            {% if v.orderid.status == 1 %}
                                            未付款
                                            {% elif v.orderid.status == 2 %}
                                            已付款,待发货
                                            {% elif v.orderid.status == 3 %}
                                            已发货,待收货
                                            {% elif v.orderid.status == 4 %}
                                            已完成
                                            {% elif v.orderid.status == 5 %}
                                            已取消
                                            {% endif %}

                                            </td>
                                            <td class="am-text-middle">{{ v.orderid.addtime }}</td>
                                            <td class="am-text-middle">
                                                <div class="tpl-table-black-operation ">
                                                    <a href="{% url 'orderedit' v.id %}">
                                                        <i class="am-icon-pencil"></i> 管理
                                                    </a>
                                                    <a href="{% url 'orderxq' v.id %}" class="tpl-table-black-operation-del">
                                                        <i class="am-icon-pencil"></i>详情
                                                    </a>
                                                </div>
                                            </td>
                                        </tr>

                                        {% endfor %}
                                       
                                    </tbody>
                                </table>
                            </div>

                            <div class="am-u-lg-12 am-cf">

                                <div class="am-fr">
                                    <ul class="am-pagination tpl-pagination">
                                        
                                        {% load pagetag %}
                    
                                        {% PageShow info.paginator.num_pages request %}




                                    </ul>
                                </div>
                            </div>
                           
                           
                        </div>
                    </div>
                </div>
            </div>
        </div>
   </div>




    

{% endblock %}
